This repository has been archived by the owner on Sep 30, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, clients fail to parse the autocomplete model. Context can be found in this thread.
This issue is not reproducible in all cases. Clients (tested in VS Code only) may resolve the autocomplete model based on the client configuration and feature flags before parsing the provider and model data from the connected Sourcegraph instance. However, if we disable the client configuration and feature flags (make
resolveDefaultModelFromVSCodeConfigOrFeatureFlags
always returnnull
), creating the provider configuration for autocomplete consistently fails (at least for me).The current implementation of codyLLMConfigurationResolver returns:
provider
completionModel
.This PR proposes to return only the model ID as
completionModel
. This adjustment allows clients to correctly resolve the provider and model for completions.I don’t believe this is a comprehensive solution or that it aligns with the new model configuration approach. With this change,
chatModel
andfastChatModel
use model IDs prefixed with providers, while code completions use a combination ofprovider
andcompletionModel
(without the provider prefix as it’s a separate field).This PR is primarily for demonstration purposes. For more details, refer to the referenced Linear thread.
Test plan
Tested locally in VS Code.
Configuration used for testing
resolveDefaultModelFromVSCodeConfigOrFeatureFlags
always returningnull